<script lang='ts' setup>
import InputItem from '../item/fat-form-create-item.vue'
import { IFormConfig, IFormItem } from '../type'

const props = defineProps<{
  layoutList: IFormItem[];
  isContainer?: boolean;
}>()

const layoutList = computed(() => {
  return props.layoutList || []
})
</script>

<template>
  <el-row :gutter="20" class="list-group" style="width: 100%;">
    <template v-for="element, index in layoutList">
      <el-col v-if="element.inEdit" :span="element.span" :class="{ container: isContainer }">
        <InputItem v-if="!isContainer" mode="view" :item="element" />
        <InputItem v-else mode="view" :item="element" />
      </el-col>
    </template>
  </el-row>
</template>

<style lang='scss' scoped></style>